# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Sergej Chodarev <sergejx@centrum.sk>
# Contributor: zhuqin <zhuqin83@gmail.com>

pkgname=gedit-plugins
pkgver=44.1
pkgrel=2
pkgdesc="Collection of plugins for the gedit Text Editor"
url="https://wiki.gnome.org/Apps/Gedit/ShippedPlugins"
arch=(loong64 x86_64)
license=(GPL)
depends=(
  gedit
  python-cairo
  python-dbus
)
makedepends=(
  appstream-glib
  git
  gobject-introspection
  gucharmap
  libgit2-glib
  meson
  vte3
  yelp-tools
)
optdepends=(
  'gucharmap: for charmap plugin'
  'libgit2-glib: for git plugin'
  'vte3: for embedded terminal'
)
_commit=d558bb69903dc2dae1983c52ee90e6b4864889ad  # tags/44.1^0
source=("git+https://gitlab.gnome.org/GNOME/gedit-plugins.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"

  python -m compileall -d /usr "$pkgdir/usr"
  python -O -m compileall -d /usr "$pkgdir/usr"
}

# vim:set sw=2 sts=-1 et:
